# TODO: Add comment
# 
# Author: wuping
###############################################################################



testfun=function(x){
	for(i in 1:1000000){
		t=1
	}
}

t0=Sys.time()
mclapply(c(1:20),testfun,mc.cores=2)
t1=Sys.time()-t0
t0=Sys.time()
mclapply(c(1:20),testfun,mc.cores=6)
t2=Sys.time()-t0
t0=Sys.time()
mclapply(c(1:20),testfun,mc.cores=10)
t3=Sys.time()-t0
t0=Sys.time()
mclapply(c(1:20),testfun,mc.cores=20)
t4=Sys.time()-t0


# The results showed that mc.cores could control how many cores used in CentOS.
